# -*- coding: utf-8 -*-
from django.core.mail import send_mail

FROM_EMAIL = 'rsj217@gmail.com'

MAIL_FOOT = u'''
Dmblog开发小组.
<a href="http://www.Dmblog.com">Dmblog.com</a>'''

def send_regist_success_mail(userinfo):
    subject = u'注册成功'
    body = u'''你好！
    你已经成功注册成为Tmitter用户
    以下是您的信息：
    用户名：%s 
    密码:%s
    ''' % (userinfo['username'],userinfo['password'])
    recipient_list= [userinfo['email']]    
    send(subject,body,recipient_list)

    
def send(subject,body,recipient_list):
    body += MAIL_FOOT
    send_mail(subject,body, FROM_EMAIL, recipient_list,fail_silently=True)     
